<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en-us" xml:lang="en-us">
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="DC.Type" content="topic">
  <meta name="DC.Title" content="Preparing for Backup">
  <meta name="product" content="">
  <meta name="DC.Relation" scheme="URI" content="en-us_topic_0000002200068013.html">
  <meta name="prodname" content="">
  <meta name="version" content="">
  <meta name="brand" content="">
  <meta name="DC.Publisher" content="20250306">
  <meta name="prodname" content="csbs">
  <meta name="documenttype" content="usermanual">
  <meta name="DC.Format" content="XHTML">
  <meta name="DC.Identifier" content="EN-US_TOPIC_0000002200068001">
  <meta name="DC.Language" content="en-us">
  <link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
  <title>Preparing for Backup</title>
 </head>
 <body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px">
  <a name="EN-US_TOPIC_0000002200068001"></a><a name="EN-US_TOPIC_0000002200068001"></a>
  <h1 class="topictitle1">Preparing for Backup</h1>
  <div>
   <p>Before the backup, prepare related information as instructed in <a href="#EN-US_TOPIC_0000002200068001__en-us_topic_0000001508383465_table10744125193920">Table 1</a>.</p>
   <div class="tablenoborder">
    <a name="EN-US_TOPIC_0000002200068001__en-us_topic_0000001508383465_table10744125193920"></a><a name="en-us_topic_0000001508383465_table10744125193920"></a>
    <table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000002200068001__en-us_topic_0000001508383465_table10744125193920" frame="border" border="1" rules="all">
     <caption>
      <b>Table 1 </b>Preparations for backup
     </caption>
     <colgroup>
      <col style="width:27.51%">
      <col style="width:36.14%">
      <col style="width:36.36%">
     </colgroup>
     <thead align="left">
      <tr>
       <th align="left" class="cellrowborder" valign="top" width="27.507249275072493%" id="mcps1.3.2.2.4.1.1"><p>Item</p></th>
       <th align="left" class="cellrowborder" valign="top" width="36.13638636136386%" id="mcps1.3.2.2.4.1.2"><p>How to Obtain</p></th>
       <th align="left" class="cellrowborder" valign="top" width="36.35636436356364%" id="mcps1.3.2.2.4.1.3"><p>To Be Used In</p></th>
      </tr>
     </thead>
     <tbody>
      <tr>
       <td class="cellrowborder" valign="top" width="27.507249275072493%" headers="mcps1.3.2.2.4.1.1 "><p>Name and password of the user used for installing the AntDB database</p></td>
       <td class="cellrowborder" valign="top" width="36.13638636136386%" headers="mcps1.3.2.2.4.1.2 "><p>Contact the database administrator to obtain the information. The default value is <strong>antdb</strong>.</p></td>
       <td class="cellrowborder" rowspan="6" valign="top" width="36.35636436356364%" headers="mcps1.3.2.2.4.1.3 "><p><a href="en-us_topic_0000002164667246.html">Step 2: Registering a Single AntDB Instance</a></p> <p><a href="en-us_topic_0000002164826982.html">Step 3: Registering an AntDB Cluster Instance</a></p></td>
      </tr>
      <tr>
       <td class="cellrowborder" valign="top" headers="mcps1.3.2.2.4.1.1 "><p>Full path of the configuration file (this file is unavailable in a single-node database)</p></td>
       <td class="cellrowborder" valign="top" headers="mcps1.3.2.2.4.1.2 "><p>Contact the database administrator to obtain the information.</p> <p>You can use PuTTY to log in to the AntDB database host and run the <strong>ps -ef |grep adbhamgr |grep -v grep</strong> command to query the configuration file path. In the command output, <strong>/etc/adbhamgr/adbhamgr_antdbcluster.yaml</strong> is the configuration file path, as shown in the following figure:</p> <pre class="screen">[root@antdb-165-71 ~]# ps -ef |grep adbhamgr |grep -v grep
antdb     179351       1  0 16:18 ?        00:00:01 /home/antdb/antdb/tool/adbpy3/bin/adbpy3 /home/antdb/antdb/tool/adbhamgr/bin/adbhamgr /etc/adbhamgr/adbhamgr_antdbcluster.yaml</pre></td>
      </tr>
      <tr>
       <td class="cellrowborder" valign="top" headers="mcps1.3.2.2.4.1.1 "><p>Database installation path</p></td>
       <td class="cellrowborder" valign="top" headers="mcps1.3.2.2.4.1.2 ">
        <ul>
         <li>Single-node system<p>Use PuTTY to log in to the AntDB database host and run the <strong>ps -ef |grep postgres</strong> command. Information similar to the following is displayed. <strong>/home/antdb/antdb</strong> preceding <strong>-D</strong> is the database installation path.</p> <pre class="screen">[root@antdb-165-71 ~]# ps -ef |grep postgres
antdb     179351       1  0 16:18 ?        00:00:01 /home/antdb/antdb/bin/postgres -D /home/antdb/antdb/data</pre></li>
         <li>Cluster<p>Find the path in the <strong>bin_dir</strong> line in the configuration file (for example, <strong>adbhamgr_antdbcluster.yaml</strong>). If information similar to the following is displayed, the path is <strong>/home/antdb/app</strong>.</p> <pre class="screen">bin_dir: /home/antdb/app/bin</pre></li>
        </ul></td>
      </tr>
      <tr>
       <td class="cellrowborder" valign="top" headers="mcps1.3.2.2.4.1.1 "><p>Database port</p></td>
       <td class="cellrowborder" valign="top" headers="mcps1.3.2.2.4.1.2 ">
        <ol>
         <li id="EN-US_TOPIC_0000002200068001__li338764418113"><a name="EN-US_TOPIC_0000002200068001__li338764418113"></a><a name="li338764418113"></a>Use PuTTY to log in to the AntDB database host (in the case of a database cluster, query the port on any host). Run the <strong>ps -ef |grep postgres</strong> first. Information similar to the following is displayed. <strong>/home/antdb/antdb/data</strong> following <strong>-D</strong> is the data directory in the database.<pre class="screen">[root@antdb-165-71 ~]# ps -ef |grep postgres
antdb     179351       1  0 16:18 ?        00:00:01 /home/antdb/antdb/bin/postgres -D /home/antdb/antdb/data</pre></li>
         <li>Run the <strong>grep -w port </strong><em>Full path of the data directory in the database</em><strong>/postgresql.conf</strong> command based on the database directory in <a href="#EN-US_TOPIC_0000002200068001__li338764418113">1</a>. The following information is displayed, and the port number is 6655.<pre class="screen">[root@antdb-165-71 ~]# grep -w port /home/antdb/antdb/data/postgresql.conf
port = 6655                     #(change requires restart)</pre></li>
        </ol></td>
      </tr>
      <tr>
       <td class="cellrowborder" valign="top" headers="mcps1.3.2.2.4.1.1 "><p>Username and password of the database</p></td>
       <td class="cellrowborder" valign="top" headers="mcps1.3.2.2.4.1.2 ">
        <ul>
         <li>Single-node system<p>Contact the database administrator to obtain the information.</p></li>
         <li>Cluster<p>In the configuration file (for example, <strong>adbhamgr_antdbcluster.yaml</strong>), check the values of <span class="parmname"><b>username</b></span> and <span class="parmname"><b>password</b></span> under the <strong>superuser</strong> line.</p></li>
        </ul></td>
      </tr>
      <tr>
       <td class="cellrowborder" valign="top" headers="mcps1.3.2.2.4.1.1 "><p>Username and password for streaming replication of the database (this user is not required for the database of a single server)</p></td>
       <td class="cellrowborder" valign="top" headers="mcps1.3.2.2.4.1.2 "><p>In the configuration file (for example, <strong>adbhamgr_antdbcluster.yaml</strong>), check the values of <span class="parmname"><b>username</b></span> and <span class="parmname"><b>password</b></span> under the <strong>replication</strong> line.</p></td>
      </tr>
     </tbody>
    </table>
   </div>
  </div>
  <div>
   <div class="familylinks">
    <div class="parentlink">
     <strong>Parent topic:</strong> <a href="en-us_topic_0000002200068013.html">Backup</a>
    </div>
   </div>
  </div>
 </body>
</html>